﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BLL
{
    public class GetVideo
    {

        /// <summary>
        /// Phương thức lấy giao diện youtube về web mình
        /// Tham khảo từ website:
        /// http://lichsu.vn/
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static string GetYouTubeScript(string id)
        {

            string scr = @"<object width='320' height='240'> ";

            scr = scr + @"<param name='movie' value='http://www.youtube.com/v/" + id + "'></param> ";

            scr = scr + @"<param name='allowFullScreen' value='true'></param> ";

            scr = scr + @"<param name='allowscriptaccess' value='always'></param> ";

            scr = scr + @"<embed src='http://www.youtube.com/v/" + id + "' ";

            scr = scr + @"type='application/x-shockwave-flash' allowscriptaccess='always'      ";

            scr = scr + @"allowfullscreen='true' width='900' height='700'> ";

            scr = scr + @"</embed></object>";

            return scr;

        }
    }
}